home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / vbccmail / uudll.bas < prev    next >
Encoding:
BASIC Source File  |  1997-05-12  |  23.5 KB  |  651 lines

  1. Attribute VB_Name = "UUdlldeclares"
  2. '
  3. ' * Message Types
  4. '
  5. Public Const UUMSG_MESSAGE = 0                      ' just a message, nothing important
  6. Public Const UUMSG_NOTE = 1                         ' something that should be noticed
  7. Public Const UUMSG_WARNING = 2                      ' important msg, processing continues
  8. Public Const UUMSG_ERROR = 3                        ' processing has been terminated
  9. Public Const UUMSG_FATAL = 4                        ' decoder cannot process further requests
  10. Public Const UUMSG_PANIC = 5                        ' recovery impossible, app must terminate
  11.  
  12. '
  13. ' * Return Values
  14. '
  15. Public Const UURET_OK = 0                           ' everything went fine
  16. Public Const UURET_IOERR = 1                        ' I/O Error - examine errno
  17. Public Const UURET_NOMEM = 2                        ' not enough memory
  18. Public Const UURET_ILLVAL = 3                       ' illegal value for operation
  19. Public Const UURET_NODATA = 4                       ' decoder didn't find any data
  20. Public Const UURET_NOEND = 5                        ' encoded data wasn't ended properly
  21. Public Const UURET_UNSUP = 6                        ' unsupported function (encoding)
  22. Public Const UURET_EXISTS = 7                       ' file exists (decoding)
  23. Public Const UURET_CONT = 8                         ' continue -- special from ScanPart
  24. Public Const UURET_CANCEL = 9                       ' operation cancelled
  25.  
  26. '
  27. ' * File states, may be OR'ed
  28. '
  29. Public Const UUFILE_READ = 0                        ' Read in, but not further processed
  30. Public Const UUFILE_MISPART = 1                     ' Missing Part(s) detected
  31. Public Const UUFILE_NOBEGIN = 2                     ' No 'begin' found
  32. Public Const UUFILE_NOEND = 4                       ' No 'end' found
  33. Public Const UUFILE_NODATA = 8                      ' File does not contain valid uudata
  34. Public Const UUFILE_OK = 16                         ' All Parts found, ready to decode
  35. Public Const UUFILE_ERROR = 32                      ' Error while decoding
  36. Public Const UUFILE_DECODED = 64                    ' Successfully decoded
  37. Public Const UUFILE_TMPFILE = 128                   ' Temporary decoded file exists
  38.  
  39. '
  40. ' * Encoding Types
  41. '
  42. Public Const UU_ENCODED = 1                         ' UUencoded data
  43. Public Const B64ENCODED = 2                         ' Mime-Base64 data
  44. Public Const XX_ENCODED = 3                         ' XXencoded data
  45. Public Const BH_ENCODED = 4                         ' Binhex encoded
  46. Public Const PT_ENCODED = 5                         ' Plain-Text encoded (MIME)
  47. Public Const QP_ENCODED = 6                         ' Quoted-Printable (MIME)
  48.  
  49. '
  50. ' * Option indices for GetOption / SetOption
  51. '
  52. Public Const UUOPT_VERSION = 0                      ' version number MAJOR.MINORplPATCH (ro)
  53. Public Const UUOPT_FAST = 1                         ' assumes only one part per file
  54. Public Const UUOPT_DUMBNESS = 2                     ' switch off the program's intelligence
  55. Public Const UUOPT_BRACKPOL = 3                     ' give numbers in [] higher precendence
  56. Public Const UUOPT_VERBOSE = 4                      ' generate informative messages
  57. Public Const UUOPT_DESPERATE = 5                    ' try to decode incomplete files
  58. Public Const UUOPT_IGNREPLY = 6                     ' ignore RE:plies (off by default)
  59. Public Const UUOPT_OVERWRITE = 7                    ' whether it's OK to overwrite ex. files
  60. Public Const UUOPT_SAVEPATH = 8                     ' prefix to save-files on disk
  61. Public Const UUOPT_IGNMODE = 9                      ' ignore the original file mode
  62. Public Const UUOPT_DEBUG = 10                       ' print messages with FILE/LINE info
  63. Public Const UUOPT_ERRNO = 14                       ' get last error code for UURET_IOERR (ro)
  64. Public Const UUOPT_PROGRESS = 15                    ' retrieve progress information
  65. Public Const UUOPT_USETEXT = 16                     ' handle text messages
  66. Public Const UUOPT_PREAMB = 17                      ' handle Mime preambles/epilogues
  67. Public Const UUOPT_TINYB64 = 18                     ' detect short B64 outside of Mime
  68. Public Const UUOPT_ENCEXT = 19                      ' extension for single-part encoded files
  69.  
  70. '
  71. ' * Code for the "action" in the progress structure
  72. '
  73. Public Const UUACT_IDLE = 0                         ' we don't do anything
  74. Public Const UUACT_SCANNING = 1                     ' scanning an input file
  75. Public Const UUACT_DECODING = 2                     ' decoding into a temp file
  76. Public Const UUACT_COPYING = 3                      ' copying temp to target
  77. Public Const UUACT_ENCODING = 4                     ' encoding a file
  78.  
  79.  
  80. '
  81. ' UUVBEncode control constants (see below)
  82. '
  83. Public Const UUVBE_NONE = 0                         ' No MIME headers (use standard headers)
  84. Public Const UUVBE_SIMPLE = 1                       ' Simple MIME (no addressing)
  85. Public Const UUVBE_MAIL = 2                         ' MIME E-mail format
  86. Public Const UUVBE_NEWS = 3                         ' MIME News format
  87.  
  88.  
  89. '
  90. ' UUVBListData control items (see uudeview.h)
  91. '
  92. Public Const UUVBLD_STATE = 0                       ' uulist.state
  93. Public Const UUVBLD_MODE = 1                        ' uulist.mode
  94. Public Const UUVBLD_BEGIN = 2                       ' uulist.begin
  95. Public Const UUVBLD_END = 3                         ' uulist.end
  96. Public Const UUVBLD_UUDET = 4                       ' uulist.uudet
  97. Public Const UUVBLD_FLAGS = 5                       ' uulist.flags
  98. Public Const UUVBLD_SIZE = 6                        ' uulist.size
  99. Public Const UUVBLD_FILEN = 7                       ' uulist.filename
  100. Public Const UUVBLD_SUBF = 8                        ' uulist.subfname
  101. Public Const UUVBLD_MIMEID = 9                      ' uulist.mimeid
  102. Public Const UUVBLD_MIMETYPE = 10                   ' uulist.mimetype
  103. Public Const UUVBLD_BINFILE = 11                    ' uulist.binfile
  104. Public Const UUVBLD_HAVEPART = 12                   ' uulist.haveparts[subscr]
  105. Public Const UUVBLD_MISSPART = 13                   ' uulist.msparts[subscr]
  106. Public Const UUVBLD_UFPART = 14                     ' uulist.thisfile[subscr].partno
  107. Public Const UUVBLD_UFRSUBJ = 15                    ' uulist.thisfile[subscr].data.subject
  108. Public Const UUVBLD_UFRORG = 16                     ' uulist.thisfile[subscr].data.origin
  109. Public Const UUVBLD_UFRSFN = 17                     ' uulist.thisfile[subscr].data.sfname
  110.  
  111.  
  112. '
  113. ' -----------------------
  114. ' 32-Bit DLL Declarations
  115. ' -----------------------
  116. '
  117.  
  118. '
  119. ' Initialize for decoding or encoding.  Call before EVERY batch!
  120. '
  121. Public Declare Sub UUVBInit Lib "uudeview.dll" ()
  122.  
  123. '
  124. ' Retrieve the last error or information message from the library.  Retrieving
  125. '  a message clears the message buffer.
  126. '
  127. '   message     =   String to accept message
  128. '   severity    =   Severity level for error messages
  129. '
  130. '   Return      =   TRUE if there was a message to retrieve.
  131. '
  132. Public Declare Function UUVBMessage Lib "uudeview.dll" _
  133.     (ByRef message As String, _
  134.      ByRef severity As Integer) As Boolean
  135.      
  136. '
  137. ' Walk the list of files found during the UULoadFile operations.  Returns
  138. '  status information, etc.
  139. '
  140. '   ptr         =   Pointer to list item (opaque long integer)
  141. '   filename    =   Returns name of file that will be decoded
  142. '   state       =   Returns informational message about the item
  143. '   flags       =   Returns Status of this item (see File Status Mask values)
  144. '   nextitem    =   Pointer to next list item (=0 if no more items)
  145. '
  146. '   Return      =   TRUE if there are items in the list after this item
  147. '
  148. Public Declare Function UUVBListWalk Lib "uudeview.dll" _
  149.     (ByVal ptr As Long, _
  150.      ByRef filename As String, _
  151.      ByRef state As String, _
  152.      ByRef flags As Integer, _
  153.      ByRef nextitem As Long) As Boolean
  154.  
  155. '
  156. ' Filter a filename to ensure that it is acceptable to Win32
  157. '
  158. '   filename    =   Filename to filter
  159. '
  160. '   Return      =   Filtered filename
  161. '
  162. Public Declare Function UUVBFileFilter Lib "uudeview.dll" _
  163.     (ByVal filename As String) As String
  164.      
  165. '
  166. ' Deletes an item from the decode list
  167. '
  168. '   item        =   Pointer to item to delete
  169. '
  170. '   Return      =   TRUE if the delete worked
  171. '
  172. Public Declare Function UUVBListDelete Lib "uudeview.dll" _
  173.     (ByVal item As Long) As Boolean
  174.  
  175. '
  176. ' Gets pointer to first item in the decode list
  177. '
  178. '   firstitem   =   Returns pointer to first decode list item
  179. '
  180. '   Return      =   TRUE if there are items in the list
  181. '
  182. Public Declare Function UUVBListFirst Lib "uudeview.dll" _
  183.     (ByRef firstitem As Long) As Boolean
  184.  
  185. '
  186. ' Gets info (text ahead of encoded data) for an item in the decode list
  187. '
  188. '   item        =   Pointer to list item to examine
  189. '   info        =   Returns info string up to 16K
  190. '
  191. '   Return      =   UURET_OK or error code from list
  192. '
  193. Public Declare Function UUVBGetInfo Lib "uudeview.dll" _
  194.     (ByVal item As Long, _
  195.      ByRef info As String) As Integer
  196.  
  197. '
  198. ' Decodes a file from the list and writes it to specified name
  199. '
  200. '   ptr         =   Pointer to decode list item to process
  201. '   flags       =   Returns new status bits following decode
  202. '   outfilename =   Output name for decoded item
  203. '   uuret       =   Returns UURET_OK or error code returned by decode function
  204. '   mvret       =   Returns 0 or Win32 error code caused by file move operation
  205. '
  206. '   Return      =   TRUE if everything worked OK
  207. '
  208. Public Declare Function UUVBDecode Lib "uudeview.dll" _
  209.     (ByVal ptr As Long, ByRef flags As Integer, _
  210.      ByVal outfilename As String, _
  211.      ByRef uuret As Long, ByRef mvret As Long) As Boolean
  212.  
  213. '
  214. ' Get an option (see main library documentation for details)
  215. '
  216. '   optno       =   Number of option to read (see UUOPT_ list)
  217. '   value       =   Returns value for integer options
  218. '   stringval   =   Returns value for string options
  219. '
  220. '   Return      =   TRUE if option value was retrieved
  221. '
  222. ' Note that this is UU->VB<-GetOption, not UUGetOption!
  223. '
  224. Public Declare Function UUVBGetOption Lib "uudeview.dll" _
  225.     (ByVal optno As Long, ByRef value As Long, _
  226.      ByRef stringval As String) As Boolean
  227.     
  228. '
  229. ' Get the current library version, including the build date
  230. '
  231. '   Return      =   DLL patch level and build date
  232. '
  233. Public Declare Function UUVBLibVersion Lib "uudeview.dll" _
  234.     () As String
  235.     
  236. '
  237. ' Encode a binary file, more flexible version
  238. '
  239. '   inputfilename   =   Name of binary file to encode
  240. '   outputfilename  =   Name of disk file to encode to
  241. '   nameinfile      =   Name to place in file (filename to be used when file is decoded)
  242. '   encoding        =   Type of encoding to use (??_ENCODED list)
  243. '   linesperfile    =   Sets maximum number of lines in each output file (0 = create single file)
  244. '   MimeHeaders     =   Enables MIME-style headers (see UUVBE_* constants)
  245. '   dest            =   E-mail address of recipient or Newsgroup list
  246. '   from            =   Name and E-Mail address of sender
  247. '   subject         =   Subject Line for message
  248. '
  249. '   Return          =   TRUE if the operation completed successfully
  250. '
  251. Public Declare Function UUVBEncode Lib "uudeview.dll" _
  252.     (ByVal inputfilename As String, _
  253.      ByVal outputfilename As String, _
  254.      ByVal nameinfile As String, _
  255.      ByVal encoding As Long, _
  256.      ByVal linesperfile As Long, _
  257.      ByVal MimeHeaders As Integer, _
  258.      ByVal dest As String, _
  259.      ByVal from As String, _
  260.      ByVal subject As String) As Boolean
  261.     
  262. '
  263. ' Read information from the File List
  264. '
  265. '   ptr             =   Item to examine
  266. '   itemno          =   Which piece of information to retrieve
  267. '   subscript       =   Subscript to be used with arrays and lists
  268. '   retvar          =   Receives retrieved information
  269. '
  270. '   Return          =   TRUE if the information was retrieved successfully
  271. '
  272. Public Declare Function UUVBListData Lib "uudeview.dll" _
  273.     (ByVal ptr As Long, _
  274.      ByVal itemno As Integer, _
  275.      ByVal subscript As Integer, _
  276.      ByRef retvar As Variant) As Boolean
  277.  
  278. '
  279. ' Clean up after an batch is complete
  280. '
  281. Public Declare Sub UUVBShutdown Lib "uudeview.dll" ()
  282.  
  283. '
  284. ' ------------------------------------
  285. '
  286. ' UUDeview Library Functions
  287. '
  288. ' ------------------------------------
  289. '
  290.  
  291. ' First-time setup
  292. Public Declare Function UUInitialize Lib "uudeview.dll" _
  293.    () As Integer
  294.  
  295. '
  296. ' Retrieve options
  297. '
  298. '   option_no       =   Option to retrieve
  299. '   int_return      =   Integer Return buffer
  300. '   string_return   =   String Return buffer
  301. '   string_return_len = Length of String Return buffer
  302. '
  303. '   Return          =   Integer option value, 0 for strings, -1 for error
  304. '
  305. Public Declare Function UUGetOption Lib "uudeview.dll" _
  306.    (ByVal option_no As Long, _
  307.     ByRef int_return As Long, _
  308.     ByVal string_return As String, _
  309.     ByVal string_return_len As Long) As Long
  310.  
  311.  
  312. '
  313. ' Set options
  314. '
  315. '   option_no       =   Option to set
  316. '   int_value       =   Value for integer options
  317. '   string_value    =   Value for string options
  318. '
  319. '   Return          =   UURET_ILLVAL for illegal option, UURET_OK otherwise
  320. '
  321. Public Declare Function UUSetOption Lib "uudeview.dll" _
  322.    (ByVal option_no As Long, _
  323.     ByVal int_value As Long, _
  324.     ByVal string_value As String) As Long
  325.  
  326.  
  327. '
  328. ' Converts a UU error code to a string
  329. '
  330. '   code            =   Code to convert
  331. '   Return          =   Error string
  332. '
  333. Public Declare Function UUstrerror Lib "uudeview.dll" _
  334.    (ByVal code As Long) As Long
  335.  
  336.  
  337. '
  338. ' Sets a function that is called when the UU library wants to send
  339. ' a message to the caller
  340. '
  341. '   opaque          =   Any pointer; will be passed to callback
  342. '   callback        =   C function pointer to callback [int (*)]
  343. '
  344. '   Return          =   UURET_OK
  345. '
  346. Public Declare Function UUSetMsgCallback Lib "uudeview.dll" _
  347.     (ByVal opaque As Long, ByVal callback As Long) As Long
  348.  
  349.  
  350. '
  351. ' Sets a function that will be called periodically during the
  352. ' decoding process
  353. '
  354. '   opaque          =   Any pointer; will be passed to callback
  355. '   callback        =   C function pointer to callback [int (*)]
  356. '   interval        =   Number of milliseconds between calls
  357. '
  358. '   Return          =   UURET_OK
  359. '
  360. Public Declare Function UUSetBusyCallback Lib "uudeview.dll" _
  361.     (ByVal opaque As Long, ByVal callback As Long, _
  362.      ByVal interval As Long) As Long
  363.  
  364.  
  365. '
  366. ' Set a function that will be called before the UU library attempts to
  367. ' read each file.
  368. '
  369. '   opaque          =   Any pointer; will be passed to callback
  370. '   callback        =   C function pointer to callback [int (*)]
  371. '
  372. '   Return          =   UURET_OK
  373. '
  374. Public Declare Function UUSetFileCallback Lib "uudeview.dll" _
  375.     (ByVal opaque As Long, ByVal callback As Long) As Long
  376.  
  377.  
  378. '
  379. ' Set a function that will receive each decoded filename before the
  380. ' file is opened.  Filename can be altered to suit local system limitations.
  381. '
  382. '   opaque          =   Any pointer; will be passed to callback
  383. '   callback        =   C function pointer to callback [int (*)]
  384. '
  385. '   Return          =   UURET_OK
  386. '
  387. Public Declare Function UUSetFNameFilter Lib "uudeview.dll" _
  388.     (ByVal opaque As Long, ByVal filter As Long) As Long
  389.  
  390.  
  391. '
  392. ' Run the current filename filter on a filename
  393. '
  394. '   filename        =   Filename to filter
  395. '
  396. '   Return          =   filtered filename
  397. '
  398. Public Declare Function UUFNameFilter Lib "uudeview.dll" _
  399.     (ByVal filename As String) As Long
  400.  
  401.  
  402. '
  403. ' Return a pointer to the nth item in the File List
  404. '
  405. '   n               =   Item to retrieve
  406. '
  407. '   Return          =   Pointer to the item or NULL if no such item [uulist *]
  408. '
  409. Public Declare Function UUGetFileListItem Lib "uudeview.dll" _
  410.     (ByVal n As Integer) As Long
  411.  
  412. '
  413. ' The first part of the decoding process.  Each file passed to this function
  414. ' is parsed.  If any decodable files are found, they will be added to the
  415. ' global File List.
  416. '
  417. '   filename        =   File to load
  418. '   fileid          =   Identifying information about file (or NULL if none)
  419. '   deflag          =   Delete file after decoding (or on cleanup)
  420. '
  421. ' Returns UURET_OK or error code
  422. '
  423. Public Declare Function UULoadFile Lib "uudeview.dll" _
  424.    (ByVal filename As String, _
  425.     ByVal fileid As String, _
  426.     ByVal delflag As Long) As Long
  427.  
  428.  
  429. '
  430. ' Changes the planned output filename of a decodable file on the
  431. ' File List
  432. '
  433. '   fl_item         =   File List Item to alter [uulist *]
  434. '   newname         =   New output filename
  435. '
  436. '   Return          =   UURET_OK or error code
  437. '
  438. Public Declare Function UURenameFile Lib "uudeview.dll" _
  439.    (ByVal fl_item As Long, _
  440.     ByVal newname As String) As Long
  441.  
  442.  
  443. '
  444. ' Decode a file in the File List to a temporary file
  445. '
  446. '   fl_item         =   Item to decode [uulist *]
  447. '
  448. '   Return          =   UURET_OK or error code
  449. '
  450. Public Declare Function UUDecodeToTemp Lib "uudeview.dll" _
  451.    (ByVal fl_item As Long) As Long
  452.  
  453. '
  454. ' Remove the temporary file created by UUDecodeToTemp
  455. '
  456. '   fl_item         =   Item to remove temporary file from [uulist *]
  457. '
  458. '   Return          =   UURET_OK or error code
  459. '
  460. Public Declare Function UURemoveTemp Lib "uudeview.dll" _
  461.    (ByVal fl_item As Long) As Long
  462.  
  463.  
  464. '
  465. ' Decodes a file in the File List to a temporary file,
  466. ' then moves it to a destination.  If the "save path" has been
  467. ' set in the Options, the destination file will be created using
  468. ' that path
  469. '
  470. '   fl_item         =   Item to decode [uulist *]
  471. '   dest            =   Destination filename
  472. '
  473. '   Return          =   UURET_OK or error code
  474. '
  475. Public Declare Function UUDecodeFile Lib "uudeview.dll" _
  476.    (ByVal fl_item As Long, _
  477.     ByVal dest As String) As Long
  478.  
  479.  
  480. '
  481. ' Retrieve information about a file in the File List.  This may include
  482. ' news headers, the "zeroth" part of a multipart file, etc.
  483. ' The callback function is sent lines of information until none remains
  484. ' or until it returns a non-zero value.
  485. '
  486. '   fl_item         =   Item to examine [uulist *]
  487. '   opaque          =   Any pointer; will be passed to callback function
  488. '   callback        =   C Function Pointer (gets Info lines)
  489. '
  490. '   Return          =   UURET_OK or error code
  491. '
  492. Public Declare Function UUInfoFile Lib "uudeview.dll" _
  493.    (ByVal fl_item As Long, _
  494.     ByVal opaque As Long, _
  495.     ByVal callback As Long) As Long
  496.  
  497.  
  498. '
  499. ' Delete the File List and clear the Save Path for another
  500. ' decoding operation
  501. '
  502. '   Return          =   UURET_OK
  503. '
  504. Public Declare Function UUCleanUp Lib "uudeview.dll" () As Long
  505.  
  506.  
  507. '
  508. ' Encode a binary file to a stream in one piece using MIME multipart
  509. ' headers
  510. '
  511. '   outfile         =   Output stream [FILE *]
  512. '   infile          =   Input stream (NULL means open infname) [FILE *]
  513. '   infname         =   Input filename (if not stream)
  514. '   encoding        =   Encoding type
  515. '   outfname        =   Filename to encode "as" if not the same is infname
  516. '   mimetype        =   MIME content type
  517. '   filemode        =   UNIX file mode (==> 0)
  518. '
  519. '   Return          =   UURET_OK or otherwise
  520. '
  521. Public Declare Function UUEncodeMulti Lib "uudeview.dll" _
  522.    (ByVal outfile As Long, _
  523.     ByVal infile As Long, _
  524.     ByVal infname As String, _
  525.     ByVal encoding As Long, _
  526.     ByVal outfname As String, _
  527.     ByVal mimetype As String, _
  528.     ByVal filemode As Long) As Long
  529.  
  530.  
  531. '
  532. ' Encode a binary file to a stream in pieces with headers
  533. '
  534. '   outfile         =   Output stream [FILE *]
  535. '   infile          =   Input stream (NULL means open infname) [FILE *]
  536. '   infname         =   Input filename (if not stream)
  537. '   encoding        =   Encoding type
  538. '   outfname        =   Filename to encode "as" if not the same is infname
  539. '   mimetype        =   MIME content type
  540. '   filemode        =   UNIX file mode (==> 0)
  541. '   partno          =   Segment number
  542. '   linperfile      =   Number of lines per file
  543. '
  544. '   Return          =   UURET_OK or otherwise
  545. '
  546. Public Declare Function UUEncodePartial Lib "uudeview.dll" _
  547.    (ByVal outfile As Long, _
  548.     ByVal infile As Long, ByVal infname As String, _
  549.     ByVal encoding As Long, ByVal outfname As String, _
  550.     ByVal mimetype As String, ByVal filemode As Long, _
  551.     ByVal partno As Long, _
  552.     ByVal linperfile As Long) As Long
  553.  
  554.  
  555. '
  556. ' Encode a binary file to a stream -- no headers
  557. '
  558. '   outfile         =   Output stream [FILE *]
  559. '   infile          =   Input stream (NULL means open infname) [FILE *]
  560. '   infname         =   Input filename (if not stream)
  561. '   encoding        =   Encoding type
  562. '   outfname        =   Filename to encode "as" if not the same is infname
  563. '   filemode        =   UNIX file mode (==> 0)
  564. '
  565. '   Return          =   UURET_OK or otherwise
  566. '
  567. Public Declare Function UUEncodeToStream Lib "uudeview.dll" _
  568.    (ByVal outfile As Long, _
  569.     ByVal infile As Long, _
  570.     ByVal infname As String, _
  571.     ByVal encoding As Long, _
  572.     ByVal outfname As String, _
  573.     ByVal filemode As Long) As Long
  574.  
  575.  
  576. '
  577. ' Encode straight to a disk file(s), no headers
  578. '
  579. '   infile          =   Input stream (NULL means open infname) [FILE *]
  580. '   infname         =   Input filename (if not stream)
  581. '   encoding        =   Encoding type
  582. '   outfname        =   Filename to encode "as" if not the same is infname
  583. '   diskname        =   Name of output file
  584. '   linperfile      =   Number of lines per file (<= 0 means one file)
  585. '
  586. '   Return          =   UURET_OK or other   wise
  587. '
  588. Public Declare Function UUEncodeToFile Lib "uudeview.dll" _
  589.    (ByVal infile As Long, _
  590.     ByVal infname As String, _
  591.     ByVal encoding As Long, _
  592.     ByVal outfname As String, _
  593.     ByVal diskname As String, _
  594.     ByVal linperfile As Long) As Long
  595.  
  596.  
  597. '
  598. ' Encode to a single file using Mail/News style headers
  599. '
  600. '   outfile         =   Output stream [FILE *]
  601. '   infile          =   Input stream (NULL means open infname) [FILE *]
  602. '   infname         =   Input file (if not stream)
  603. '   encoding        =   Encoding type
  604. '   outfname        =   Filename to encode "as" if not the same is infname
  605. '   filemode        =   UNIX file mode (==> 0)
  606. '   destination     =   Destination e-mail address or newsgroup
  607. '   from            =   Sender's name/email
  608. '   subject         =   Subject line
  609. '   isemail         =   NZ means e-mail; Z means newsgroup
  610. '
  611. '   Return          =   UURET_OK or otherwise
  612. '
  613. Public Declare Function UUE_PrepSingle Lib "uudeview.dll" _
  614.    (ByVal outfile As Long, _
  615.     ByVal infile As Long, ByVal infname As String, _
  616.     ByVal encoding As Long, ByVal outfname As String, _
  617.     ByVal filemode As Long, ByVal destination As String, _
  618.     ByVal from As String, ByVal subject As String, _
  619.     ByVal isemail As Long) As Long
  620.  
  621.  
  622.  
  623. '
  624. ' Encode to multiple files using Mail/News style headers
  625. '
  626. '   outfile         =   Output stream [FILE *]
  627. '   infile          =   Input stream (NULL means open infname) [FILE *]
  628. '   infname         =   Input file (if not stream)
  629. '   encoding        =   Encoding type
  630. '   outfname        =   Filename to encode "as" if not the same is infname
  631. '   filemode        =   UNIX file mode (==> 0)
  632. '   partno          =   Segment number
  633. '   linperfile      =   Lines per segment
  634. '   filesize        =   Size of input file
  635. '   destination     =   Destination e-mail address or newsgroup
  636. '   from            =   Sender's name/email
  637. '   subject         =   Subject line
  638. '   isemail         =   NZ means e-mail; Z means newsgroup
  639. '
  640. '   Return          =   UURET_OK or otherwise
  641. '
  642. Public Declare Function UUE_PrepPartial Lib "uudeview.dll" _
  643.    (ByVal outfile As Long, _
  644.     ByVal infile As Long, ByVal infname As String, _
  645.     ByVal encoding As Long, ByVal outfname As String, _
  646.     ByVal filemode As Long, ByVal partno As Long, _
  647.     ByVal linperfile As Long, ByVal filesize As Long, _
  648.     ByVal destination As String, ByVal from As String, _
  649.     ByVal subject As String, _
  650.     ByVal isemail As Long) As Long
  651.